_ITEMS	= "BaseWars/gamemode/Shared/items/*.lua" 
_Mixtures = "BaseWars/gamemode/Shared/mixtures/*.lua" 

function GM:RegisterItem(item)
	item.ID = #Basewars.Items
	item.Class = "item_"..item.Name
	if item.Stackable then item.Stack = 1 end
	table.insert(Basewars.Items,item)
end

function GM:RegisterMixture(Mixture)
	Mixture.ID = #Basewars.Mixtures
	Mixture.Class = "mixture_"..Mixture.Name
	
	table.insert(Basewars.Mixtures,Mixture)
	if !table.HasValue(Basewars.Mixtures.Categorys,Mixture.Category) then
		table.insert(Basewars.Mixtures.Categorys,Mixture.Category)
	end
end

for k,v in pairs(file.FindInLua(_ITEMS)) do
	include("Items/"..v)
	print("Loaded Item.. "..v)
	if SERVER then		
		AddCSLuaFile( "Items/" .. v )
	end
end

for k,v in pairs(file.FindInLua(_Mixtures)) do
	include("Mixtures/"..v)
	if SERVER then
		AddCSLuaFile( "Mixtures/" .. v )
	end
end

